set the loch of sprite the clickon to the loch of sprite the clickon + 1
set the locv of sprite the clickon to the locv of sprite the clickon + 1
updatestage
set the loch of sprite the clickon to the loch of sprite the clickon - 1
set the locv of sprite the clickon to the locv of sprite the clickon - 1
set the cursor of sprite the clickon to 4
if the controlDown = TRUE then set enablePrintPictures = TRUE
else set enablePrintPictures = FALSE
-- set backframe to the frame
-- if the colordepth > 8 then puppettransition 51, 02, 16
-- if the machinetype < 256 then
-- go to "printmac"
-- else
-- go to "printwin"
-- end if
global demo, current_pm
-- if clickbutton() then
if demo then
alert "Printing is not available in this version."
else
set doc = 0 -- dispose of old one if there
-- HEAD OFF MISSING xTRA if needed
set XtraList = []
repeat with counter = 1 to (the number of xtras)
append xtralist, the name of xtra counter
end repeat
if string(XtraList) contains "PrintOMatic_Lite" then nothing
else
case the machinetype of
256: -- PC error msg
alert "Please ensure that the files ''POMLITE.X16'' and ''POMLITE.X32'' are in the folder called ''PMCD\XTRAS\''. You will have to 1). quit the Prime Ministers application, 2). make sure ''POMLITE.X16'' and ''POMLITE.X32'' are in the folder called ''PMCD\XTRAS\'' and then 3). Double-click the Prime Ministers Icon. Then you will be able to try printing. If this doesn't work, try removing, then re-installing the Prime Ministers application."
otherwise: -- Mac error msg
alert "Please ensure that the file ''PrintOMatic Lite'' is in the folder called ''Xtras,'' which is in the foler containing the ''Launch PMs'' icon. You will have to 1). quit the Prime Ministers application, 2). make sure ''PrintOMatic Lite'' is in the folder called ''Xtras,'' and then 3). Double-click the ''Launch PMs'' icon. Then you will be able to try printing. If this doesn't work, try removing, then re-installing the Prime Ministers application."
end case
end if
set doc = new(xtra "PrintOMatic_Lite")
-- validate printer
if not objectP(doc) then
beep
alert "Sorry, no printer is available."
exit
end if
-- boilerplate
set copyRightNotice = ¼
"____________________________________" & return ¼
& "from the Prime Ministers of Canada CD-ROM" & return¼
& "Copyright ⌐1996, 1997 ExCITE, Simon Fraser University"
set pmStatsDB = [1: [#pmname: "Sir John A Macdonald", #pmparty: "Conservative", #pmtermtag: "Terms", #pmterms: ["1 July 1867 - 5 Nov 1873", "17 Oct 1878 - 6 June 1891"]], 2: [#pmname: "Alexander Mackenzie", #pmparty: "Liberal", #pmtermtag: "Term", #pmterms: ["7 Nov 1873 - 9 Oct 1878"]], 3: [#pmname: "Sir John J.C. Abbott", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["16 June 1891 - 24 Nov 1892"]], 4: [#pmname: "Sir John Sparrow Thompson", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["5 Dec 1892 - 12 Dec 1894"]], 5: [#pmname: "Sir Mackenzie Bowell", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["21 Dec 1894 - 27 April 1896"]], 6: [#pmname: "Sir Charles Tupper", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["1 May 1896 - 8 July 1896"]], 7: [#pmname: "Sir Wilfrid Laurier", #pmparty: "Liberal", #pmtermtag: "Term", #pmterms: ["11 July 1896 - 6 Oct 1911"]], 8: [#pmname: "Sir Robert Laird Borden", #pmparty: "Conservative, Unionist", #pmtermtag: "Term", #pmterms: ["10 Oct 1911 - 10 July 1920"]], 9: [#pmname: "Arthur Meighen", #pmparty: "Conservative", #pmtermtag: "Terms", #pmterms: ["10 July 1920 - 29 Dec 1921", "29 June 1926 - 25 Sept 1926"]], 10: [#pmname: "William Lyon Mackenzie King", #pmparty: "Liberal", #pmtermtag: "Terms", #pmterms: ["29 Dec 1921 - 28 June 1926", "25 Sept 1926 - 6 Aug 1930", "23 Oct 1935 - 15 Nov 1948"]], 11: [#pmname: "Richard Bedford Bennett", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["7 Aug 1930 - 23 Oct 1935"]], 12: [#pmname: "Louis St.Laurent", #pmparty: "Liberal", #pmtermtag: "Term ofOffice:", #pmterms: ["15 Nov 1948 - 21 June 1957"]], 13: [#pmname: "John George Diefenbaker", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["21 June 1957 - 22 April 1963"]], 14: [#pmname: "Lester Bowles Pearson", #pmparty: "Liberal", #pmtermtag: "Term", #pmterms: ["22 April 1963 - 20 April 1968"]], 15: [#pmname: "Pierre Elliott Trudeau", #pmparty: "Liberal", #pmtermtag: "Terms", #pmterms: ["20 April 1968 - 3 June 1979", "3 March 1980 - 30 June 1984"]], 16: [#pmname: "Charles Joseph Clark", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["4 June 1979 - 2 March 1980"]], 17: [#pmname: "John Napier Turner", #pmparty: "Liberal", #pmtermtag: "Term", #pmterms: ["30 June 1984 - 17 Sept 1984"]], 18: [#pmname: "Martin Brian Mulroney", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["17 Sept 1984 - 25 June 1993"]], 19: [#pmname: "Kim Campbell", #pmparty: "Conservative", #pmtermtag: "Term", #pmterms: ["25 June 1993 - 4 Nov 1993"]], 20: [#pmname: "Jean Chretien", #pmparty: "Liberal", #pmtermtag: "Term", #pmterms: ["4 Nov 1993 - Present"]]]
-- get the stuff to print
set titleLine = ""
set printKnowledge = new(script"interface profiler parent")
derive printKnowledge
set theList = the membsToPrint of printKnowledge
--NB DO NOT change textpop.dir without changing the sprite numbers in here
global glossontop
if glossontop then
-- (windowPresent("textpop.dir")): -- glossary popup is open
tell window("textpop.dir") to derive printKnowledge
-- store glossary term
tell window("textpop.dir") to put the text of the member of sprite 6 into theText
-- store glossary definition
tell window("textpop.dir") to put return & return & the text of the member of sprite 2 after theText
else
if enablePrintPictures = TRUE then
if the type of (getat(theList, 1)) = #bitmap then
put getat(theList, 1) into printPicture
-- check in list of (dis)allowed picture cast members here ?
end if
end if
case the type of (getat(theList, count(theList))) of
#richText, #field:
put the text of (getat(theList, count(theList))) into theText
put line 1 of theText into titleLine
delete line 1 of theText
end case
case the type of (getat(theList, count(theList))) of
#richText, #field:
put the text of (getat(theList, count(theList))) into theText
put line 1 of theText into titleLine
delete line 1 of theText
end case
end if
-- case true of
-- (the width of printPicture > 600): setLandscapeMode doc, TRUE
-- otherwise: setLandscapeMode doc, FALSE
-- end case
-- headline & space
setTextSize doc, 14
setTextStyle doc, "Bold"
append doc, "Profile: "
setTextStyle doc, "Normal"
-- ID for Prime Minister here
set pmIDrec = getat(pmStatsDB, current_pm)
-- name & party
set pmNameStr = the pmname of pmIDrec && "(" & the pmparty of pmIDrec & ")" & return
append doc, pmNameStr
-- years in office
repeat with theTerm in the pmterms of pmIDrec
set theYearsStr = theYearsStr & theTerm
if length(the last line of theYearsStr) > 45 then put return after theYearsStr
else put " " after theYearsStr
end repeat
set theTermsStr = the pmtermtag of pmIDrec && "in Office:" && theYearsStr
setTextSize doc, 12
setTextStyle doc, "Italic"
append doc theTermsStr & return & return
-- picture & space
if not voidP(printPicture) then
append doc, printPicture
append doc return
end if
-- body
setTextStyle doc, "Normal"
-- title line or photo credit
if titleLine <> EMPTY then append doc, titleLine & return
append doc, theText
-- space & footer
setTextSize doc, 9
setTextStyle doc, "Italic"
append doc, return & copyRightNotice
-- go
-- if doJobSetup (doc) = TRUE then print doc -- inserts a print setup dialogue box.
-- until the palette issue is resolved, don't show a dialogue box.
print doc
-- put theText
-- free up memory
set doc = 0
end if
updatestage
set the cursor of sprite the clickon to [member "hand", member "hand mask"]
-- if the colordepth > 8 then puppettransition 51, 02, 16